package com.example.module.shoppingCart.service;


import com.example.module.shoppingCart.form.CartUpdateForm;
import com.example.module.shoppingCart.form.GetShopingCartForm;
import com.example.module.shoppingCart.form.ShoppingCartAddForm;
import com.example.module.shoppingCart.form.ShoppingCartDeleteForm;
import com.example.module.shoppingCart.vo.GetShoppingCartVO;

import java.util.List;

/**
 * @author ghy
 * @date 2025/08/28
 * @description 购物车服务
 */
public interface ShoppingCartService {
    /*
    * 添加商品至购物车
    *
    * @param shoppingCartAddForm
    * @return void
    * */
    void addShoppingCart(ShoppingCartAddForm shoppingCartAddForm);

    /*
     *  根据商品Id查询对应收藏
     *
     * @param getShopingCartForm
     * @return getShoppingCartVO
     * */
    GetShoppingCartVO getShoppingCartByGoodsId(GetShopingCartForm getShopingCartForm);

    /*
     * 从购物车中移除商品
     *
     * @param ShoppingCartDeleteForm
     * @return void
     * */
    void deleteShoppingCart(ShoppingCartDeleteForm form);

    /*
     * 批量修改购物车中的商品数量
     *
     * @param List<CartUpdateForm>
     * @return void
     * */
    void updateCart(List<CartUpdateForm> formList);
}
